/**
 * FileName: ApplicationZuul
 * Author:   杨兴
 * Date:     2019/8/14 14:09
 * Description: 网关启动
 */
package com.xiongmao.gongyu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;

@EnableEurekaClient
@SpringBootApplication
@EnableZuulProxy
@EnableHystrix
public class ApplicationZuul {
    public static void main(String[] args){

        SpringApplication.run(ApplicationZuul.class,args);
    }

    @RefreshScope
    @ConfigurationProperties()
    public ZuulProperties zuulProperties(){
        return new ZuulProperties();
    }
}
